home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr47 / sch250.zip / DMSTATES.PRG < prev    next >
Text File  |  1992-09-18  |  774b  |  32 lines

  1. *****
  2. * UDF to check for a valid state
  3. *****
  4. function dmstates
  5. if upper(mvstate) $ "CA,WA,OR,NV,UT"
  6.     return .t.
  7. else
  8.     *****
  9.     * You may wish to declare an array such as this outside of the
  10.     * UDF in order to save time on slower machines...
  11.     *****
  12.     public mvwest[5]
  13.     mvwest[1]="CA"
  14.     mvwest[2]="WA"
  15.     mvwest[3]="OR"
  16.     mvwest[4]="NV"
  17.     mvwest[5]="UT"
  18.     mvudfscrn=savescreen(07,10,20,70)
  19.     superbox(08,45,16,66,.f.,"",.t.)
  20.     superbox(10,46,10,65,.f.,"",.f.)
  21.     say(09,47,"  Select a State")
  22.     mvselect=achoice(11,55,15,56,mvwest)
  23.     if mvselect<>0
  24.         mvstate=mvwest[mvselect]
  25.     else
  26.         mvstate=space(2)
  27.     endif
  28.     mvudfscrn=restscreen(07,10,20,70,mvudfscrn)
  29.     return .f.
  30. endif
  31. return .f.
  32.